3.1.30 \(\int \frac {1}{-5-3 \cos (c+d x)} \, dx\) [30]

Optimal. Leaf size=31 \[ -\frac {x}{4}+\frac {\text {ArcTan}\left (\frac {\sin (c+d x)}{3+\cos (c+d x)}\right )}{2 d} \]

[Out]

-1/4*x+1/2*arctan(sin(d*x+c)/(3+cos(d*x+c)))/d

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {2737} \begin {gather*} \frac {\text {ArcTan}\left (\frac {\sin (c+d x)}{\cos (c+d x)+3}\right )}{2 d}-\frac {x}{4} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-5 - 3*Cos[c + d*x])^(-1),x]

[Out]

-1/4*x + ArcTan[Sin[c + d*x]/(3 + Cos[c + d*x])]/(2*d)

Rule 2737

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{q = Rt[a^2 - b^2, 2]}, Simp[-x/q, x] - Sim
p[(2/(d*q))*ArcTan[b*(Cos[c + d*x]/(a - q + b*Sin[c + d*x]))], x]] /; FreeQ[{a, b, c, d}, x] && GtQ[a^2 - b^2,
 0] && NegQ[a]

Rubi steps

\begin {align*} \int \frac {1}{-5-3 \cos (c+d x)} \, dx &=-\frac {x}{4}+\frac {\tan ^{-1}\left (\frac {\sin (c+d x)}{3+\cos (c+d x)}\right )}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 20, normalized size = 0.65 \begin {gather*} \frac {\text {ArcTan}\left (2 \cot \left (\frac {1}{2} (c+d x)\right )\right )}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-5 - 3*Cos[c + d*x])^(-1),x]

[Out]

ArcTan[2*Cot[(c + d*x)/2]]/(2*d)

________________________________________________________________________________________

Maple [A]
time = 0.05, size = 18, normalized size = 0.58

method result size
derivativedivides \(-\frac {\arctan \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2}\right )}{2 d}\) \(18\)
default \(-\frac {\arctan \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2}\right )}{2 d}\) \(18\)
risch \(-\frac {i \ln \left ({\mathrm e}^{i \left (d x +c \right )}+3\right )}{4 d}+\frac {i \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {1}{3}\right )}{4 d}\) \(38\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(-5-3*cos(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-1/2/d*arctan(1/2*tan(1/2*d*x+1/2*c))

________________________________________________________________________________________

Maxima [A]
time = 0.48, size = 24, normalized size = 0.77 \begin {gather*} -\frac {\arctan \left (\frac {\sin \left (d x + c\right )}{2 \, {\left (\cos \left (d x + c\right ) + 1\right )}}\right )}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-5-3*cos(d*x+c)),x, algorithm="maxima")

[Out]

-1/2*arctan(1/2*sin(d*x + c)/(cos(d*x + c) + 1))/d

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 26, normalized size = 0.84 \begin {gather*} \frac {\arctan \left (\frac {5 \, \cos \left (d x + c\right ) + 3}{4 \, \sin \left (d x + c\right )}\right )}{4 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-5-3*cos(d*x+c)),x, algorithm="fricas")

[Out]

1/4*arctan(1/4*(5*cos(d*x + c) + 3)/sin(d*x + c))/d

________________________________________________________________________________________

Sympy [A]
time = 0.34, size = 44, normalized size = 1.42 \begin {gather*} \begin {cases} - \frac {\operatorname {atan}{\left (\frac {\tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{2} \right )} + \pi \left \lfloor {\frac {\frac {c}{2} + \frac {d x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor }{2 d} & \text {for}\: d \neq 0 \\\frac {x}{- 3 \cos {\left (c \right )} - 5} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-5-3*cos(d*x+c)),x)

[Out]

Piecewise((-(atan(tan(c/2 + d*x/2)/2) + pi*floor((c/2 + d*x/2 - pi/2)/pi))/(2*d), Ne(d, 0)), (x/(-3*cos(c) - 5
), True))

________________________________________________________________________________________

Giac [A]
time = 0.43, size = 30, normalized size = 0.97 \begin {gather*} -\frac {d x + c - 2 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 3}\right )}{4 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-5-3*cos(d*x+c)),x, algorithm="giac")

[Out]

-1/4*(d*x + c - 2*arctan(sin(d*x + c)/(cos(d*x + c) + 3)))/d

________________________________________________________________________________________

Mupad [B]
time = 0.25, size = 38, normalized size = 1.23 \begin {gather*} \frac {\mathrm {atan}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )-\frac {d\,x}{2}}{2\,d}-\frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}\right )}{2\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-1/(3*cos(c + d*x) + 5),x)

[Out]

(atan(tan(c/2 + (d*x)/2)) - (d*x)/2)/(2*d) - atan(tan(c/2 + (d*x)/2)/2)/(2*d)

________________________________________________________________________________________